package com.seveneight.baijiesteward.ui.user.model;

import android.content.Context;
import android.util.Log;

import com.alibaba.fastjson.JSON;
import com.seveneight.baijiesteward.bean.AnyBean;
import com.seveneight.baijiesteward.bean.BaseEntity;
import com.seveneight.baijiesteward.http.BaseModel;
import com.seveneight.baijiesteward.http.BaseObserver;
import com.seveneight.baijiesteward.http.MyCallBack;
import com.seveneight.baijiesteward.http.RetrofitFactory;

import okhttp3.RequestBody;

/**
 * 删除还款执行中
 * Created by user1 on 2018/4/14.
 */

public class PlanRePayRemoveModel extends BaseModel {
    public void getBankList(Context context, RequestBody body, MyCallBack<AnyBean> myCallBack) {

        RetrofitFactory.getInstence().API()
                .payPlanRemove(body)
                .compose(this.<BaseEntity<AnyBean>>setThread())
                .subscribe(new BaseObserver<AnyBean>(context) {
                    @Override
                    protected void onSuccees(BaseEntity<AnyBean> t) throws Exception {
                        myCallBack.onSuccess((t.getData()));
                    }

                    @Override
                    protected void onFailure(Throwable e, boolean isNetWorkError) throws Exception {

                    }
                });
    }
}
